home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / zuck / vbaust1.bas < prev    next >
Encoding:
BASIC Source File  |  1994-10-06  |  4.3 KB  |  112 lines

  1. ' ------------------------------------------------------------------------
  2. '
  3. '     VBAust1.BAS -- Demonstration of Windows API Access
  4. '
  5. '                       Copyright (C) 1993 Desaware
  6. '
  7. '  You have a royalty-free right to use, modify, reproduce and distribute
  8. '  this file (and/or any modified version) in any way you find useful,
  9. '  provided that you agree that Desaware has no
  10. '  warranty, obligation or liability for its contents.
  11. '
  12. ' ------------------------------------------------------------------------
  13. Option Explicit
  14.  
  15. Type RECT   '8 Bytes
  16.     left As Integer
  17.     top As Integer
  18.     right As Integer
  19.     bottom As Integer
  20. End Type
  21.  
  22. Type POINTAPI  '4 Bytes - Synonymous with LONG
  23.     X As Integer
  24.     Y As Integer
  25. End Type
  26.  
  27. Type SIZEAPI  '4 Bytes - Synonymous with LONG
  28.     X As Integer
  29.     Y As Integer
  30. End Type
  31.  
  32. Global Const VK_NUMLOCK = &H90
  33. Global Const VK_SCROLL = &H91
  34. Global Const VK_CAPITAL = &H14
  35.  
  36. Global Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
  37.  
  38. Global Const BITSPIXEL = 12 '  Number of bits per pixel
  39. Global Const PLANES = 14    '  Number of planes
  40.  
  41. Global Const DT_WORDBREAK = &H10
  42.  
  43. Global Const GWW_HINSTANCE = (-6)
  44.  
  45. Global Const WM_USER = &H400
  46. Global Const EM_GETLINECOUNT = WM_USER + 10
  47.  
  48. Global Const MF_INSERT = &H0
  49. Global Const MF_CHANGE = &H80
  50. Global Const MF_APPEND = &H100
  51. Global Const MF_DELETE = &H200
  52. Global Const MF_REMOVE = &H1000
  53.  
  54. Global Const MF_BYCOMMAND = &H0
  55. Global Const MF_BYPOSITION = &H400
  56.  
  57. Global Const MF_SEPARATOR = &H800
  58.  
  59. Global Const MF_ENABLED = &H0
  60. Global Const MF_GRAYED = &H1
  61. Global Const MF_DISABLED = &H2
  62.  
  63. Global Const MF_UNCHECKED = &H0
  64. Global Const MF_CHECKED = &H8
  65. Global Const MF_USECHECKBITMAPS = &H200
  66.  
  67. Global Const MF_STRING = &H0
  68. Global Const MF_BITMAP = &H4
  69. Global Const MF_OWNERDRAW = &H100
  70.  
  71. Global Const MF_POPUP = &H10
  72. Global Const MF_MENUBARBREAK = &H20
  73. Global Const MF_MENUBREAK = &H40
  74.  
  75. Global Const MF_UNHILITE = &H0
  76. Global Const MF_HILITE = &H80
  77.  
  78. Global Const MF_SYSMENU = &H2000
  79. Global Const MF_HELP = &H4000
  80. Global Const MF_MOUSESELECT = &H8000
  81.  
  82.  
  83. Declare Function BitBlt% Lib "GDI" (ByVal hDestDC%, ByVal X%, ByVal Y%, ByVal nWidth%, ByVal nHeight%, ByVal hSrcDC%, ByVal XSrc%, ByVal YSrc%, ByVal dwRop&)
  84. Declare Sub CloseWindow Lib "User" (ByVal hWnd%)
  85. Declare Function CreateSolidBrush% Lib "GDI" (ByVal crColor&)
  86. Declare Function DrawText% Lib "User" (ByVal hDC%, ByVal lpStr$, ByVal nCount%, lpRect As RECT, ByVal wFormat%)
  87. Declare Function FindWindowByString% Lib "User" Alias "FindWindow" (ByVal lpClassName&, ByVal lpWindowName$)
  88. Declare Sub GetClientRect Lib "User" (ByVal hWnd%, lpRect As RECT)
  89. Declare Function GetDeviceCaps% Lib "GDI" (ByVal hDC%, ByVal nIndex%)
  90. Declare Function GetKeyState% Lib "User" (ByVal nVirtKey%)
  91. Declare Function GetMenu% Lib "User" (ByVal hWnd%)
  92. Declare Function GetMenuCheckMarkDimensions& Lib "User" ()
  93. Declare Function GetMenuItemCount% Lib "User" (ByVal hMenu%)
  94. Declare Function GetMenuItemId% Lib "User" (ByVal hMenu%, ByVal nPos%)
  95. Declare Function GetModuleUsage% Lib "Kernel" (ByVal hModule%)
  96. Declare Function GetProfileString% Lib "Kernel" (ByVal lpAppName$, ByVal lpKeyName As Any, ByVal lpDefault$, ByVal lpReturnedString$, ByVal nSize%)
  97. Declare Function GetSubMenu% Lib "User" (ByVal hMenu%, ByVal nPos%)
  98. Declare Sub GetWindowRect Lib "User" (ByVal hWnd%, lpRect As RECT)
  99. Declare Function GetWindowWord% Lib "User" (ByVal hWnd%, ByVal nIndex%)
  100. Declare Sub InflateRect Lib "User" (lpRect As RECT, ByVal X%, ByVal Y%)
  101. Declare Function ModifyMenu% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal wIDNewItem%, ByVal lpString As Any)
  102. Declare Function ModifyMenuBynum% Lib "User" Alias "ModifyMenu" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal wIDNewItem%, ByVal lpString&)
  103. Declare Function ModifyMenuBystring% Lib "User" Alias "ModifyMenu" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal wIDNewItem%, ByVal lpString$)
  104. Declare Function Rectangle% Lib "GDI" (ByVal hDC%, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%)
  105. Declare Function DeleteObject% Lib "GDI" (ByVal hObject%)
  106. Declare Function SelectObject% Lib "GDI" (ByVal hDC%, ByVal hObject%)
  107. Declare Function SendMessageBynum& Lib "User" Alias "SendMessage" (ByVal hWnd%, ByVal wMsg%, ByVal wParam%, ByVal lParam&)
  108. Declare Sub SetWindowText Lib "User" (ByVal hWnd%, ByVal lpString$)
  109.  
  110.  
  111.  
  112.